package com.ruoyi.ldzlsc.domain.vo;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 生产计划视图对象 sc_production_plan
 *
 * @author ruoyi
 * @date 2025-06-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString
public class ScProductionPlanVo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    private Long productionPlanId;

    /**
     * 计划编号
     */
    private String planCode;

    /**
     * 生产订单ID
     */
    private Long productionOrderId;

    /**
     * 计划名称
     */
    private String planName;

    /**
     * 来源类型
     */
    private String sourceType;

    /**
     * 计划状态
     */
    private String status;

    /**
     * MRP ID
     */
    private Long mrpId;

    /**
     * 车间ID
     */
    private Long workshopId;

    /**
     * 工艺ID
     */
    private Long operationalId;

    /**
     * 生产线ID
     */
    private Long productionLineId;

    // Joined fields
    private Integer workOrderCount;
    private String productName;
    private String productCode;
    private String specification;
    private String unit;
    private String productType;
    private String orderCode;
    private BigDecimal plannedQty;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date planStartTime;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date planEndTime;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date requiredDate;

    /**
     * 产品ID
     */
    private Long productId;

    /**
     * 生产计划明细列表
     */
    private List<ScProductionPlanDetailVo> details;
} 